import store from '@tapui/store'
import Layout from '@tapui/views/layout/Layout'

const addRouterMap = [
  {
    path: '/', // 首页
    component: Layout,
    hidden: true,
    redirect: 'calendarIndex',
    children: [
      {
        path: 'calendarIndex',
        component: (resolve) => require(['@/views/work/workSchedule/dashboard'], resolve),
        // component: () => import('@tapui/views/dashboard/index'),
        name: '首页',
        meta: { title: '首页', icon: 'index', keepAlive: false }
      },
      {
        path: 'testTheme',
        component: () => import('@tapui/views/layout/test'),
        name: '主题测试',
        meta: { title: '主题测试', icon: 'index', keepAlive: false }
      },
      {
        path: 'permission/cboUserGroup',
        component: () => import('@tapui/views/cbo/cboUserGroup/index.vue'),
        name: '群组管理',
        meta: { title: '群组管理', icon: 'index', keepAlive: false }
      }
    ]
  },
  {
    path: '/boardroom/elecCard', // 会议室电子牌
    component: () => import('@/views/meet/meetRoomManage/elecCard'),
    hidden: true
  },
  {
    path: '/newBridge', // 对接人事系统，新bridge
    component: () => import('@/views/bridge/index'),
    hidden: true
  },
  {
    path: '/thirdDynamic', // 对接MCR系统，edit页面
    component: () => import('@/views/thirdDynamic/index'),
    hidden: true
  }
]

store.dispatch('MergeRoutes', addRouterMap)
